﻿using System;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x02000300 RID: 768
	public class TJoinExpr : TNodeWithAliasClause
	{
		// Token: 0x1700062E RID: 1582
		// (get) Token: 0x06001B32 RID: 6962 RVA: 0x0032EFF8 File Offset: 0x0032D1F8
		// (set) Token: 0x06001B33 RID: 6963 RVA: 0x0032F000 File Offset: 0x0032D200
		public EJoinHint JoinHint
		{
			get
			{
				return this._joinHint;
			}
			set
			{
				this._joinHint = value;
			}
		}

		// Token: 0x06001B34 RID: 6964 RVA: 0x0032F00C File Offset: 0x0032D20C
		public void setJoinHint(TSourceToken st)
		{
			if (st.ToString().Equals("loop", StringComparison.CurrentCultureIgnoreCase))
			{
				this._joinHint = EJoinHint.loop;
				return;
			}
			if (st.ToString().Equals("hash", StringComparison.CurrentCultureIgnoreCase))
			{
				this._joinHint = EJoinHint.hash;
				return;
			}
			if (st.ToString().Equals("merge", StringComparison.CurrentCultureIgnoreCase))
			{
				this._joinHint = EJoinHint.hash;
				return;
			}
			if (st.ToString().Equals("remote", StringComparison.CurrentCultureIgnoreCase))
			{
				this._joinHint = EJoinHint.hash;
			}
		}

		// Token: 0x06001B35 RID: 6965 RVA: 0x0032F084 File Offset: 0x0032D284
		public void setJoinConditionOnDummy(TDummy dummy)
		{
			this.JoinConditionOnDummy = dummy;
		}

		// Token: 0x06001B36 RID: 6966 RVA: 0x0032F08D File Offset: 0x0032D28D
		public void setAliasClause(TAliasClause ac)
		{
			this.AliasClause = ac;
		}

		// Token: 0x06001B37 RID: 6967 RVA: 0x0032F096 File Offset: 0x0032D296
		public void setJointype(EJoinType jt)
		{
			this.jointype = jt;
		}

		// Token: 0x06001B38 RID: 6968 RVA: 0x0032F09F File Offset: 0x0032D29F
		public EJoinType getJointype()
		{
			return this.jointype;
		}

		// Token: 0x06001B39 RID: 6969 RVA: 0x0032F0A7 File Offset: 0x0032D2A7
		public virtual void incNestedParen()
		{
			this.nestedParen++;
		}

		// Token: 0x1700062F RID: 1583
		// (get) Token: 0x06001B3A RID: 6970 RVA: 0x0032F0B7 File Offset: 0x0032D2B7
		// (set) Token: 0x06001B3B RID: 6971 RVA: 0x0032F0BF File Offset: 0x0032D2BF
		public virtual int NestedParen
		{
			get
			{
				return this.nestedParen;
			}
			set
			{
				this.nestedParen = value;
			}
		}

		// Token: 0x17000630 RID: 1584
		// (get) Token: 0x06001B3C RID: 6972 RVA: 0x0032F0C8 File Offset: 0x0032D2C8
		// (set) Token: 0x06001B3D RID: 6973 RVA: 0x0032F0D0 File Offset: 0x0032D2D0
		public virtual EJoinType Jointype
		{
			get
			{
				return this.jointype;
			}
			set
			{
				this.jointype = value;
			}
		}

		// Token: 0x17000631 RID: 1585
		// (get) Token: 0x06001B3E RID: 6974 RVA: 0x0032F0D9 File Offset: 0x0032D2D9
		// (set) Token: 0x06001B3F RID: 6975 RVA: 0x0032F0E1 File Offset: 0x0032D2E1
		public virtual TFromTable LeftOperand
		{
			get
			{
				return this.leftOperand;
			}
			set
			{
				this.leftOperand = value;
			}
		}

		// Token: 0x17000632 RID: 1586
		// (get) Token: 0x06001B40 RID: 6976 RVA: 0x0032F0EA File Offset: 0x0032D2EA
		// (set) Token: 0x06001B41 RID: 6977 RVA: 0x0032F0F2 File Offset: 0x0032D2F2
		public virtual TFromTable RightOperand
		{
			get
			{
				return this.rightOperand;
			}
			set
			{
				this.rightOperand = value;
			}
		}

		// Token: 0x06001B42 RID: 6978 RVA: 0x0032F0FB File Offset: 0x0032D2FB
		public override void init(object arg1)
		{
			this.jointype = EJoinType.nested;
		}

		// Token: 0x06001B43 RID: 6979 RVA: 0x0032F105 File Offset: 0x0032D305
		public override void init(object arg1, object arg2)
		{
			this.leftOperand = (TFromTable)arg1;
			this.rightOperand = (TFromTable)arg2;
		}

		// Token: 0x17000633 RID: 1587
		// (set) Token: 0x06001B44 RID: 6980 RVA: 0x0032F11F File Offset: 0x0032D31F
		public virtual TDummy JoinConditionOnDummy
		{
			set
			{
				if (value.node1 != null)
				{
					this._onCondition = (TExpression)value.node1;
					return;
				}
				if (value.list1 != null)
				{
					this._usingColumns = (TObjectNameList)value.list1;
				}
			}
		}

		// Token: 0x17000634 RID: 1588
		// (set) Token: 0x06001B45 RID: 6981 RVA: 0x0032F154 File Offset: 0x0032D354
		public virtual TExpression JoinCondition
		{
			set
			{
				this._onCondition = value;
			}
		}

		// Token: 0x17000635 RID: 1589
		// (get) Token: 0x06001B46 RID: 6982 RVA: 0x0032F160 File Offset: 0x0032D360
		public virtual TJoinExpr LeftMostJoinExpr
		{
			get
			{
				TJoinExpr tjoinExpr = this;
				TFromTable tfromTable = this.leftOperand;
				while (tfromTable != null && tfromTable.FromtableType == ETableSource.join)
				{
					tjoinExpr = tfromTable.JoinExpr;
					tfromTable = tjoinExpr.LeftOperand;
				}
				return tjoinExpr;
			}
		}

		// Token: 0x17000636 RID: 1590
		// (get) Token: 0x06001B48 RID: 6984 RVA: 0x0032F19C File Offset: 0x0032D39C
		// (set) Token: 0x06001B47 RID: 6983 RVA: 0x0032F193 File Offset: 0x0032D393
		public virtual TObjectNameList UsingColumns
		{
			get
			{
				return this._usingColumns;
			}
			set
			{
				this._usingColumns = value;
			}
		}

		// Token: 0x17000637 RID: 1591
		// (get) Token: 0x06001B4A RID: 6986 RVA: 0x0032F1AD File Offset: 0x0032D3AD
		// (set) Token: 0x06001B49 RID: 6985 RVA: 0x0032F1A4 File Offset: 0x0032D3A4
		public virtual TExpression OnCondition
		{
			get
			{
				return this._onCondition;
			}
			set
			{
				this._onCondition = value;
			}
		}

		// Token: 0x040019E5 RID: 6629
		private EJoinHint _joinHint;

		// Token: 0x040019E6 RID: 6630
		private int nestedParen;

		// Token: 0x040019E7 RID: 6631
		private TObjectNameList _usingColumns;

		// Token: 0x040019E8 RID: 6632
		private TExpression _onCondition;

		// Token: 0x040019E9 RID: 6633
		private EJoinType jointype;

		// Token: 0x040019EA RID: 6634
		public EJoinType original_jontype;

		// Token: 0x040019EB RID: 6635
		private TFromTable leftOperand;

		// Token: 0x040019EC RID: 6636
		private TFromTable rightOperand;
	}
}
